{template 'public/header'}
{template 'public/comhead'}
<style type="text/css">
    .nav-tabs{
        margin-top: 30px;
    }
    .nav-tabs>li>a:hover{
        color: #333;
        border-color: #31C2A5;
        background-color: white;
    }
    .nav-tabs > li.active > a,.nav-tabs > li.active > a:hover{
        background-color: #31C2A5;
        color: white;
        border-color: #31C2A5;
    }
    .nav.nav-tabs{border-color: #31C2A5;}
</style>
<ul class="nav nav-tabs">    
    <li><a href="{php echo $this->createWebUrl('yellowtype')}">信息分类管理</a></li>
    <li class="active"><a href="{php echo $this->createWebUrl('addyellowtype')}">添加信息分类</a></li>
</ul>
<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
        <div class="panel panel-default">
            <div class="panel-heading">
                内容编辑
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">信息分类名称</label>
                    <div class="col-sm-9">
                        <input type="text" name="type_name" class="form-control" value="{$info['type_name']}" />
                    </div>
                </div>
               <!--  <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">简介</label>
                    <div class="col-sm-9">
                        <input type="text" name="mark" class="form-control" value="{$info['mark']}" />
                    </div>
                </div> -->
                <!-- <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">链接</label>
                    <div class="col-sm-9">
                        <input type="text" name="link" class="form-control" value="{$info['link']}" />
                    </div>
                </div> -->
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">图标</label>
                    <div class="col-sm-9">
                        {php echo tpl_form_field_image('img', $info['img'])}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">价格</label>
                    <div class="col-sm-9">
                        <input type="text" name="money" onkeyup="value=value.replace(/[^\d.]/g,'')" class="form-control" value="{$info['money']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
                    <div class="col-sm-9">
                        <input type="number" name="num" class="form-control" value="{$info['num']}" />
                        *从小到大排序
                    </div>
                </div>
                 <div class="form-group">
                    <label for="lastname" class="col-sm-2 control-label">状态</label>
                    <div class="col-sm-10">
                         <label class="radio-inline">
                            <input type="radio" name="state" value="1" {if $info['state']==1 || empty($info['state'])}checked{/if} />启用
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="state" value="2" {if $info['state']==2}checked{/if} />禁用
                        </label>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group col-sm-12">
            <input type="submit" name="submit" value="提交" class="btn col-lg-3" style="color: white;background-color: #31C2A5;"/>
            <input type="hidden" name="token" value="{$_W['token']}" />
            <input type="hidden" name="id" value="{$info['id']}" />
        </div>
    </form>
</div>

<script type="text/javascript">
    $(function(){
        $("#frame-4").show();
        $("#yframe-4").addClass("wyactive");
    })
</script>